//
//	GetMajorListByParamMajorList.m
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport



#import "GetMajorListByParamMajorList.h"

NSString *const kGetMajorListByParamMajorListMajorCode = @"majorCode";
NSString *const kGetMajorListByParamMajorListMajorName = @"majorName";

@interface GetMajorListByParamMajorList ()
@end
@implementation GetMajorListByParamMajorList




/**
 * Instantiate the instance using the passed dictionary values to set the properties values
 */

-(instancetype)initWithDictionary:(NSDictionary *)dictionary
{
	self = [super init];
	if(![dictionary[kGetMajorListByParamMajorListMajorCode] isKindOfClass:[NSNull class]]){
		self.majorCode = dictionary[kGetMajorListByParamMajorListMajorCode];
	}	
	if(![dictionary[kGetMajorListByParamMajorListMajorName] isKindOfClass:[NSNull class]]){
		self.majorName = dictionary[kGetMajorListByParamMajorListMajorName];
	}	
	return self;
}


/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
-(NSDictionary *)toDictionary
{
	NSMutableDictionary * dictionary = [NSMutableDictionary dictionary];
	if(self.majorCode != nil){
		dictionary[kGetMajorListByParamMajorListMajorCode] = self.majorCode;
	}
	if(self.majorName != nil){
		dictionary[kGetMajorListByParamMajorListMajorName] = self.majorName;
	}
	return dictionary;

}

/**
 * Implementation of NSCoding encoding method
 */
/**
 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
 */
- (void)encodeWithCoder:(NSCoder *)aCoder
{
	if(self.majorCode != nil){
		[aCoder encodeObject:self.majorCode forKey:kGetMajorListByParamMajorListMajorCode];
	}
	if(self.majorName != nil){
		[aCoder encodeObject:self.majorName forKey:kGetMajorListByParamMajorListMajorName];
	}

}

/**
 * Implementation of NSCoding initWithCoder: method
 */
- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
	self = [super init];
	self.majorCode = [aDecoder decodeObjectForKey:kGetMajorListByParamMajorListMajorCode];
	self.majorName = [aDecoder decodeObjectForKey:kGetMajorListByParamMajorListMajorName];
	return self;

}

/**
 * Implementation of NSCopying copyWithZone: method
 */
- (instancetype)copyWithZone:(NSZone *)zone
{
	GetMajorListByParamMajorList *copy = [GetMajorListByParamMajorList new];

	copy.majorCode = [self.majorCode copyWithZone:zone];
	copy.majorName = [self.majorName copyWithZone:zone];

	return copy;
}
@end